﻿using ShareFrame.Entity.Base_BasicData;
using ShareFrame.Entity.Base_Manage;
using ShareFrame.Entity.DTO;
using ShareFrame.Util;
using ShareFrame.Util.ClassLibrary;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;

namespace ShareFrame.IBusiness.Base_Manage
{
    public interface IHomeBusiness
    {
        Task<string> SubmitLoginAsync(LoginInputDTO input);
        Task ChangePwdAsync(ChangePwdInputDTO input);
        Task<PageResult<Base_Action>> SqlSugarTestAsync(BaseDbOption basedbOptions);
        Task<PageResult<StatisDTO>> GetStatisDataAsync(BaseDbOption basedbOptions);

        //Task TestMongoDBAdd(MongoDBOptions mdbOptions, Base_Door input);
        //Task TestMongoDBUpdate(MongoDBOptions mdbOptions, Base_Door input);
        //Task TestMongoDBDelete(MongoDBOptions mdbOptions, string Id);
        //Task<PageResult<Base_Door>> TestMongoDBFindIds(MongoDBOptions mdbOptions, List<string> ids);
        //Task<PageResult<Base_Door>> TestMongoDBFindMoreCondition(MongoDBOptions mdbOptions, PageInput<List<ConditionDTO>> input);
    }

    public class LoginInputDTO
    {
        [Required]
        public string userName { get; set; }

        [Required]
        public string password { get; set; }
    }

    public class ChangePwdInputDTO
    {
        [Required]
        public string oldPwd { get; set; }

        [Required]
        public string newPwd { get; set; }
    }
}
